/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package job.manager.db.ec;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Administrator
 */
@Entity
@Table(name = "TimeScheduleRow")
@NamedQueries({@NamedQuery(name = "TimeScheduleRowEB.findAll", query = "SELECT t FROM TimeScheduleRowEB t"), @NamedQuery(name = "TimeScheduleRowEB.findById", query = "SELECT t FROM TimeScheduleRowEB t WHERE t.id = :id"), @NamedQuery(name = "TimeScheduleRowEB.findByDateTime", query = "SELECT t FROM TimeScheduleRowEB t WHERE t.dateTime = :dateTime")})
public class TimeScheduleRowEB implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @Column(name = "dateTime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dateTime;
    @Basic(optional = false)
    @Lob
    @Column(name = "comment")
    private String comment;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scheduleRowId")
    private Collection<TimeReportEB> timeReportEBCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "startid")
    private Collection<TimeScheduleEB> timeScheduleEBCollection;
    @OneToMany(mappedBy = "endId")
    private Collection<TimeScheduleEB> timeScheduleEBCollection1;

    public TimeScheduleRowEB() {
    }

    public TimeScheduleRowEB(Integer id) {
        this.id = id;
    }

    public TimeScheduleRowEB(Integer id, Date dateTime, String comment) {
        this.id = id;
        this.dateTime = dateTime;
        this.comment = comment;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getDateTime() {
        return dateTime;
    }

    public void setDateTime(Date dateTime) {
        this.dateTime = dateTime;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Collection<TimeReportEB> getTimeReportEBCollection() {
        return timeReportEBCollection;
    }

    public void setTimeReportEBCollection(Collection<TimeReportEB> timeReportEBCollection) {
        this.timeReportEBCollection = timeReportEBCollection;
    }

    public Collection<TimeScheduleEB> getTimeScheduleEBCollection() {
        return timeScheduleEBCollection;
    }

    public void setTimeScheduleEBCollection(Collection<TimeScheduleEB> timeScheduleEBCollection) {
        this.timeScheduleEBCollection = timeScheduleEBCollection;
    }

    public Collection<TimeScheduleEB> getTimeScheduleEBCollection1() {
        return timeScheduleEBCollection1;
    }

    public void setTimeScheduleEBCollection1(Collection<TimeScheduleEB> timeScheduleEBCollection1) {
        this.timeScheduleEBCollection1 = timeScheduleEBCollection1;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TimeScheduleRowEB)) {
            return false;
        }
        TimeScheduleRowEB other = (TimeScheduleRowEB) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "job.manager.db.ec.TimeScheduleRowEB[id=" + id + "]";
    }

}
